function plot_face_anls_ms()
%close all
h = clf;
data_path = 'result/face/';
data_name = { 'face0_16.raw'};

a = load([data_path data_name{1}]);
I = cascade_basis(a);

eps_output = 'c:/users/wk/Dropbox/report/distnmf/paper1/figures/face0_16_basis.eps';
h=clf;
imshow(I);
print(h, '-depsc', '-tiff', '-r300', eps_output);
end

function I = cascade_basis(a)
m=19*10; n=19*10;
I=zeros(m,n);
for i=1:10
    for j=1:10
        idx = (i-1)*10+j;
        A = reshape(a(:, idx),19,19);
        A = A / max(A(:));
        A(1,:)=1; A(end,:)=1; A(:,1)=1; A(:,end)=1;
        I( (i-1)*19+1 : i*19, (j-1)*19+1 : j*19 ) = 1-A;
    end
end
end